/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "sciftbinfdoc")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sciftbinfdoc.findAll", query = "SELECT s FROM Sciftbinfdoc s"),
    @NamedQuery(name = "Sciftbinfdoc.findBySciftbinfdocid", query = "SELECT s FROM Sciftbinfdoc s WHERE s.sciftbinfdocid = :sciftbinfdocid"),
    @NamedQuery(name = "Sciftbinfdoc.findByValidaciondoc", query = "SELECT s FROM Sciftbinfdoc s WHERE s.validaciondoc = :validaciondoc"),
    @NamedQuery(name = "Sciftbinfdoc.findByValidaciondir", query = "SELECT s FROM Sciftbinfdoc s WHERE s.validaciondir = :validaciondir"),
    @NamedQuery(name = "Sciftbinfdoc.findByValidacionugp", query = "SELECT s FROM Sciftbinfdoc s WHERE s.validacionugp = :validacionugp"),
    @NamedQuery(name = "Sciftbinfdoc.findByFecharegistro", query = "SELECT s FROM Sciftbinfdoc s WHERE s.fecharegistro = :fecharegistro"),
    @NamedQuery(name = "Sciftbinfdoc.findByObservaciones", query = "SELECT s FROM Sciftbinfdoc s WHERE s.observaciones = :observaciones")})
public class Sciftbinfdoc implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "sciftbinfdocid")
    private Integer sciftbinfdocid;
    @Basic(optional = false)
    @NotNull
    @Column(name = "validaciondoc")
    private boolean validaciondoc;
    @Basic(optional = false)
    @NotNull
    @Column(name = "validaciondir")
    private boolean validaciondir;
    @Basic(optional = false)
    @NotNull
    @Column(name = "validacionugp")
    private boolean validacionugp;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fecharegistro")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecharegistro;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "sctptbperiodoid", referencedColumnName = "sctptbperiodoid")
    @ManyToOne(optional = false)
    private Sctptbperiodo sctptbperiodoid;
    @JoinColumn(name = "sctptbmesesid", referencedColumnName = "sctptbmesesid")
    @ManyToOne(optional = false)
    private Sctptbmeses sctptbmesesid;
    @JoinColumn(name = "sctbtbdatosgenid", referencedColumnName = "scthtbdatosgenid")
    @ManyToOne(optional = false)
    private Scthtbdatosgen sctbtbdatosgenid;
    @JoinColumn(name = "pydgtbresponsaid", referencedColumnName = "pydgtbresponsaid")
    @ManyToOne(optional = false)
    private Pydgtbresponsa pydgtbresponsaid;
    @OneToMany(cascade = CascadeType.ALL, mappedBy = "sciftbinfdocid")
    private Collection<Sciftbactinfdo> sciftbactinfdoCollection;

    public Sciftbinfdoc() {
    }

    public Sciftbinfdoc(Integer sciftbinfdocid) {
        this.sciftbinfdocid = sciftbinfdocid;
    }

    public Sciftbinfdoc(Integer sciftbinfdocid, boolean validaciondoc, boolean validaciondir, boolean validacionugp, Date fecharegistro, String observaciones) {
        this.sciftbinfdocid = sciftbinfdocid;
        this.validaciondoc = validaciondoc;
        this.validaciondir = validaciondir;
        this.validacionugp = validacionugp;
        this.fecharegistro = fecharegistro;
        this.observaciones = observaciones;
    }

    public Integer getSciftbinfdocid() {
        return sciftbinfdocid;
    }

    public void setSciftbinfdocid(Integer sciftbinfdocid) {
        this.sciftbinfdocid = sciftbinfdocid;
    }

    public boolean getValidaciondoc() {
        return validaciondoc;
    }

    public void setValidaciondoc(boolean validaciondoc) {
        this.validaciondoc = validaciondoc;
    }

    public boolean getValidaciondir() {
        return validaciondir;
    }

    public void setValidaciondir(boolean validaciondir) {
        this.validaciondir = validaciondir;
    }

    public boolean getValidacionugp() {
        return validacionugp;
    }

    public void setValidacionugp(boolean validacionugp) {
        this.validacionugp = validacionugp;
    }

    public Date getFecharegistro() {
        return fecharegistro;
    }

    public void setFecharegistro(Date fecharegistro) {
        this.fecharegistro = fecharegistro;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Sctptbperiodo getSctptbperiodoid() {
        return sctptbperiodoid;
    }

    public void setSctptbperiodoid(Sctptbperiodo sctptbperiodoid) {
        this.sctptbperiodoid = sctptbperiodoid;
    }

    public Sctptbmeses getSctptbmesesid() {
        return sctptbmesesid;
    }

    public void setSctptbmesesid(Sctptbmeses sctptbmesesid) {
        this.sctptbmesesid = sctptbmesesid;
    }

    public Scthtbdatosgen getSctbtbdatosgenid() {
        return sctbtbdatosgenid;
    }

    public void setSctbtbdatosgenid(Scthtbdatosgen sctbtbdatosgenid) {
        this.sctbtbdatosgenid = sctbtbdatosgenid;
    }

    public Pydgtbresponsa getPydgtbresponsaid() {
        return pydgtbresponsaid;
    }

    public void setPydgtbresponsaid(Pydgtbresponsa pydgtbresponsaid) {
        this.pydgtbresponsaid = pydgtbresponsaid;
    }

    @XmlTransient
    public Collection<Sciftbactinfdo> getSciftbactinfdoCollection() {
        return sciftbactinfdoCollection;
    }

    public void setSciftbactinfdoCollection(Collection<Sciftbactinfdo> sciftbactinfdoCollection) {
        this.sciftbactinfdoCollection = sciftbactinfdoCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (sciftbinfdocid != null ? sciftbinfdocid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sciftbinfdoc)) {
            return false;
        }
        Sciftbinfdoc other = (Sciftbinfdoc) object;
        if ((this.sciftbinfdocid == null && other.sciftbinfdocid != null) || (this.sciftbinfdocid != null && !this.sciftbinfdocid.equals(other.sciftbinfdocid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Sciftbinfdoc[ sciftbinfdocid=" + sciftbinfdocid + " ]";
    }
    
}
